package com.atguigu.gulimail.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimail.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author tianchao
 * @email 455433520@qq.com
 * @date 2020-05-30 11:36:33
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 存入品牌和分类的绑定关系
     * @param categoryBrandRelation
     */
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    /**
     * 根据brandId更新brandName
     * @param name
     * @param brandId
     */
    void updateBrand(String name, Long brandId);

    /**
     * 根据catId更新catName
     * @param catId
     * @param name
     */
    void updateCategory(Long catId, String name);

    /**
     * 根据分类id查询品牌
     * @param catId
     * @return
     */
    List<CategoryBrandRelationEntity> selectBrandsByCatId(Long catId);
}

